package com.lhl.cp.controller;

import com.lhl.jwt.utils.UserInfoUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: com.lhl.cp.controller.DemoController
 * @description: TODO 类描述
 * @author: king
 * @date: 2020-12-11 14:29
 **/
@Api(tags = "DemoController", produces = "DemoController")
@RestController
@Slf4j
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@RequestMapping("/sys/demo")
public class DemoController {

    @ApiOperation(value = "添加一个新的")
    @GetMapping("/test")
    public String create(){
        String id = UserInfoUtil.getUserId();
        return "hello king" +id;
    }

}
